import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { provideNzI18n } from 'ng-zorro-antd/i18n';
import { zh_CN } from 'ng-zorro-antd/i18n';
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import {HTTP_INTERCEPTORS, provideHttpClient, withInterceptors} from '@angular/common/http';
// import { LoginComponent } from './login/login.component';
// import { RegisterComponent } from './login/register/register.component';
import { appHttpInterceptor } from './services/app-http.interceptor'
// import { NzFormModule } from 'ng-zorro-antd/form';
// import { NzButtonModule } from 'ng-zorro-antd/button';
// import { NzInputModule } from 'ng-zorro-antd/input';
// import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
// import { DashboardComponent } from './dashboard/dashboard.component';
// import { TodolistsComponent } from './dashboard/todolists/todolists.component';
// import { TodolistDetailComponent } from './dashboard/todolist-detail/todolist-detail.component';
// import { TodolistAddComponent } from './dashboard/todolist-add/todolist-add.component';
// import { TodolistOperatesComponent } from './dashboard/todolist-operates/todolist-operates.component';
// import { NzModalModule } from 'ng-zorro-antd/modal';
// import { NzIconModule } from 'ng-zorro-antd/icon';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {LoginModule} from './login/login.module';
import {DashboardModule} from './dashboard/dashboard.module';
import {SvgCanvasModule} from './svg-canvas/svg-canvas.module';
import { ShowListsComponent } from './show-lists/show-lists/show-lists.component';

registerLocaleData(zh);

@NgModule({
  declarations: [
    AppComponent,
    ShowListsComponent,
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    AppRoutingModule,
    LoginModule,
    DashboardModule,
    SvgCanvasModule
  ],
  providers: [
    provideNzI18n(zh_CN),
    provideAnimationsAsync(),
    // provideHttpClient()
    provideHttpClient(
      withInterceptors([
        appHttpInterceptor,
      ])
    ),
    // {
    //   provide: HTTP_INTERCEPTORS,
    //   useClass: appHttpInterceptor,
    //   multi: true
    // }
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
